//sidebar
$menuText:#bfcbd9;
$menuActiveText:#409EFF;
$subMenuActiveText:#f4f4f5; //https://github.com/ElemeFE/element/issues/12951

$menuBg:#304156;
$menuHover:#263445;

$subMenuBg:#1f2d3d;
$subMenuHover:#001528;

$sideBarWidth: 290px;

@mixin menu-theme($color) {
  $menuText: #ffffff;
  $menuActiveText: lighten($color, 40%) !global;
  $subMenuActiveText: lighten($color, 40%) !global;

  $menuBg: $color !global;
  $menuHover: darken($menuBg, 5%) !global;

  $subMenuBg: darken($menuBg, 8%) !global;
  $subMenuHover: darken($subMenuBg, 5%) !global;
}

@if $env == "test" {
  @include menu-theme(#543d2f);
} @else if $env == "prep" {
  @include menu-theme(#32542b);
}

// the :export directive is the magic sauce for webpack
// https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass
:export {
  menuText: $menuText;
  menuActiveText: $menuActiveText;
  subMenuActiveText: $subMenuActiveText;
  menuBg: $menuBg;
  menuHover: $menuHover;
  subMenuBg: $subMenuBg;
  subMenuHover: $subMenuHover;
  sideBarWidth: $sideBarWidth;
}
